package com.aspose.cells;

class zaqn {
   private zapy a;
   private WorksheetCollection b;
   private zcfw c;
   private CustomDocumentPropertyCollection d;
   private BuiltInDocumentPropertyCollection e;
   private static final com.aspose.cells.b.c.a.za f = new com.aspose.cells.b.c.a.za(new String[]{"meta", "user-defined", "creator", "initial-creator", "subject", "keyword", "title", "description", "creation-date", "date", "print-date", "editing-duration", "editing-cycles", "generator"});

   zaqn(zapy var1) {
      this.a = var1;
      this.b = var1.b.getWorksheets();
      this.d = this.b.getCustomDocumentProperties();
      this.e = this.b.getBuiltInDocumentProperties();
   }

   void a(zcfw var1) throws Exception {
      this.c = var1;
      if (var1.n()) {
         var1.a();
      } else {
         var1.j();
         var1.d();

         while(zass.a(var1)) {
            switch(f.a(var1.p().toLowerCase())) {
            case 0:
               this.b(var1);
            }
         }

      }
   }

   void b(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            String var2 = var1.o();
            String var3 = var1.p();
            String var4;
            switch(f.a(var3.toLowerCase())) {
            case 1:
               var4 = var1.a("name");
               String var5 = var1.a("value-type");
               String var6 = var1.i();
               if (var5 == null) {
                  this.d.add(var4, var6);
               } else {
                  double var7;
                  if ("float".equals(var5)) {
                     var7 = zase.B(var6);
                     this.d.add(var4, var7);
                  } else if ("date".equals(var5)) {
                     DateTime var12 = zaqh.p(var6);
                     this.d.add(var4, var12);
                  } else if ("time".equals(var5)) {
                     try {
                        var7 = zaqh.q(var6);
                        DateTime var9 = CellsHelper.getDateTimeFromDouble(var7, this.a.b.getSettings().getDate1904());
                        this.d.add(var4, var9);
                     } catch (Exception var11) {
                        ;
                     }
                  } else if ("boolean".equals(var5)) {
                     this.d.add(var4, "true".equals(var6));
                  } else {
                     this.d.add(var4, var6);
                  }
               }
               break;
            case 2:
               var4 = var1.i();
               this.e.setLastSavedBy(var4);
               break;
            case 3:
               var4 = var1.i();
               this.e.setAuthor(var4);
               break;
            case 4:
               var4 = var1.i();
               this.e.setSubject(var4);
               break;
            case 5:
               var4 = var1.i();
               this.e.setKeywords(var4);
               break;
            case 6:
               var4 = var1.i();
               this.e.setTitle(var4);
               break;
            case 7:
               var4 = var1.i();
               this.e.setComments(var4);
               break;
            case 8:
               var4 = var1.i();
               this.e.setCreatedTime(zaqh.p(var4));
               break;
            case 9:
               var4 = var1.i();

               try {
                  this.e.setLastSavedTime(zaqh.p(var4));
               } catch (Exception var10) {
                  ;
               }
               break;
            case 10:
               var4 = var1.i();
               this.e.setLastPrinted(zaqh.p(var4));
               break;
            case 11:
            case 12:
            case 13:
               var4 = var1.i();
               this.d.add(var2, var4);
               break;
            default:
               var1.a();
            }
         }

      }
   }
}
